/*
 *  Struts tutorial : http://netbeans.org/kb/docs/web/quickstart-webapps-struts.html#login
 */
package msse;

import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;


public class MSSEform extends org.apache.struts.action.ActionForm {
    
    private String name;
    private ArrayList<String> hasil;
    private ArrayList<String> rank;
    private String error;
    
    public MSSEform() {
        super();
    }

    /**
     * @return
     */
    public String getName() {
        return name;
    }

    /**
     * @param string
     */
    public void setName(String string) {
        name = string;
    }
    
      public ArrayList<String> getHasil() {
        return hasil;
    }
      
       public ArrayList<String> setHasil(ArrayList<String> Hasil) {
        return hasil=Hasil;
    }
       
       
        public ArrayList<String>getRank() {
        return rank;
    }
      
       public ArrayList<String>setRank(ArrayList<String> Rank) {
        return rank=Rank;
    }
    /**
     * @param string
     */
 

    /**
     * @return
     */

   
    public String getError() {
        return error;
    }

    /**
     * @param email
     */
    public void setError() {
        this.error = "<span style='color:red'>Query tidak boleh null</span>";
    }

    
    /**
     * This is the action called from the Struts framework.
     *
     * @param mapping The ActionMapping used to select this instance.
     * @param request The HTTP Request we are processing.
     * @return
     */
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        ActionErrors errors = new ActionErrors();
        if (getName() == null || getName().length() < 1) {
            errors.add("name", new ActionMessage("error.name.required"));
        }
        return errors;
    }
}
